package com.huaxin.common.Entity;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * Created by Administrator on 2016/12/24.
 */

public class InfoType  implements Parcelable{
    int id;
    int parentId;
    String title;
    String description;
    String img;
    int newsLevel;

    int resId ;

    public int getResId() {
        return resId;
    }

    public void setResId(int resId) {
        this.resId = resId;
    }

    public InfoType(int resId, String title) {
        this.resId = resId;
        this.title = title;
    }

    protected InfoType(Parcel in) {
        id = in.readInt();
        parentId = in.readInt();
        title = in.readString();
        description = in.readString();
        img = in.readString();
        newsLevel = in.readInt();
    }

    public static final Creator<InfoType> CREATOR = new Creator<InfoType>() {
        @Override
        public InfoType createFromParcel(Parcel in) {
            return new InfoType(in);
        }

        @Override
        public InfoType[] newArray(int size) {
            return new InfoType[size];
        }
    };

    public int getId() {
        return id;
    }

    public int getParentId() {
        return parentId;
    }

    public String getTitle() {
        return title;
    }

    public String getDescription() {
        return description;
    }

    public String getImg() {
        return img;
    }

    public int getNewsLevel() {
        return newsLevel;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(id);
        dest.writeInt(parentId);
        dest.writeString(title);
        dest.writeString(description);
        dest.writeString(img);
        dest.writeInt(newsLevel);
    }
}
